/* Vagrant specific configurations */

class smx_vagrant {
  include smx_mongodb

  Exec {
    path      => [
      '/usr/bin',
      '/bin',
      '/sbin',
    ],
    logoutput => true,
    timeout   => '0',
  }

  exec { 'small-journal-files' :
    command => 'echo "smallfiles=true" >>  /etc/mongod.conf',
    onlyif  => 'grep -q "^smallfiles=true" /etc/mongod.conf;test $? -eq 1',
    notify  => Service['mongod'],
  }

  exec { 'remove-journal-files' :
    command => 'rm -f /var/lib/mongo/journal/*',
    before  => Exec['small-journal-files'],
  }

}
